Skip to content

feat(channel): 支持售后保障单接口 - #4106

Merged
binarywang merged 6 commits into
developfrom
feat/3987-channel-guarantee-orders
Aug 22, 2026
Merged

feat(channel): 支持售后保障单接口#4106
binarywang merged 6 commits into
developfrom
feat/3987-channel-guarantee-orders

Conversation

@binarywang

Copy link
Copy Markdown
Owner

变更内容

  • 支持保障单列表、详情、同意、协商、举证和拒绝共 6 个接口。
  • 按官方契约补齐请求字段、列表/详情差异化响应模型与操作响应解码。
  • 新增离线 TestNG/Mockito 测试,覆盖序列化、反序列化、端点委派与错误响应。
  • 新增接口采用 Java 8 default 方法,避免破坏下游自定义实现。

Closes #3987

验证

  • git diff github/develop...HEAD --check
  • 直接 TestNG:5 passed, 0 failed, 0 skipped
  • mvn -pl weixin-java-channel -am test 可完成构建;仓库全局 Surefire 配置会跳过测试,因此以上提供实际测试执行结果。

@augmentcode

augmentcode Bot commented Aug 22, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

摘要:本 PR 为 weixin-java-channel 增加微信小店保障单售后接口支持。
变更:

  • 在 `WxChannelAfterSaleService` 中新增保障单列表、详情及四类商家操作 API。
  • 通过 Java 8 `default` 方法保持既有自定义服务实现的源码兼容。
  • 在 `WxChannelAfterSaleServiceImpl` 中委派六个对应的微信售后端点。
  • 新增保障单号、协商、举证和拒绝请求模型,并使用 Jackson 字段映射。
  • 新增列表与详情响应模型,区分商品信息的集合和单项结构。
  • 在 URL 常量中注册六个 `/channels/ec/aftersale/` 保障单路径。
  • 增加 Mockito 测试依赖及 TestNG 离线测试。
  • 测试覆盖请求 JSON 字段、响应解码、默认方法兼容性和端点委派。
  • 同时更新 `.gitignore`,忽略本地 Superpowers 工作文档。
技术说明:实现复用 `shopService.post` 与 `ResponseUtils.decode`,使新接口沿用模块现有的认证、HTTP 和错误响应处理路径。

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 327063990b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

新增测试存在可修复的类型/导入分组问题且包含未在 PR 描述中说明的 .gitignore 变更,建议先调整以避免潜在检查失败与范围发散。

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

该 PR 为 weixin-java-channel 模块补齐视频号小店“售后保障单(guarantee)”能力,在现有售后服务体系(WxChannelAfterSaleService / WxChannelAfterSaleServiceImpl)中新增 6 个官方接口的 URL 常量、请求/响应模型与 Service 端点委派,并补充离线单元测试与 Mockito 依赖以验证序列化/反序列化及调用链路。

Changes:

  • WxChannelAfterSaleService / WxChannelAfterSaleServiceImpl 中新增保障单相关 6 个 API 的方法与实现,并在 WxChannelApiUrlConstants 补齐对应 URL 常量。
  • 新增保障单请求/响应模型(list/detail + modify/proof/refuse 等请求体),按官方字段名进行 Jackson 映射。
  • 新增离线 TestNG/Mockito 测试,并在模块 pom.xml 增加 mockito-core 测试依赖。
File summaries
File Description
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImplGuaranteeTest.java 新增保障单模型映射与端点委派的离线测试(含 Mockito)。
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java 新增 6 个保障单接口 URL 常量。
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeRefuseRequest.java 新增“拒绝保障单”请求模型与字段映射。
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeProofRequest.java 新增“举证保障单”请求模型与字段映射。
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListResponse.java 新增保障单列表响应模型(列表结构)。
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderListParam.java 新增保障单列表查询参数模型。
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderInfoResponse.java 新增保障单详情响应模型(详情结构)。
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeOrderIdParam.java 新增保障单号通用参数模型,供多个接口复用。
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/after/GuaranteeModifyRequest.java 新增“协商保障单”请求模型与字段映射。
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java 在售后 Service 接口中新增保障单相关默认方法(兼容下游实现)。
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImpl.java 实现保障单相关接口的 HTTP 调用与响应解码。
weixin-java-channel/pom.xml 增加 mockito-core 测试依赖以支持离线 mock 测试。
.gitignore 新增 /docs/superpowers/ 忽略规则。
Review details
  • Files reviewed: 12/13 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@binarywang
binarywang merged commit 7795387 into develop Aug 22, 2026
1 check passed
@binarywang
binarywang deleted the feat/3987-channel-guarantee-orders branch August 22, 2026 10:33
@binarywang binarywang added this to the 4.8.6 milestone Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 新增保障单模块支持

2 participants